package com.bbx.taxi.client.Task;

import android.app.Activity;
import android.content.Context;

import com.bbx.androidapi.util.SharedPreUtil;
import com.bbx.androidapi.util.ToastUtil;
import com.bbx.api.sdk.model.passanger.AddThanksBuild;
import com.bbx.api.sdk.model.passanger.CouponCountBuild;
import com.bbx.api.sdk.model.passanger.Return.AddThanks;
import com.bbx.api.sdk.net.base.BaseNetwork;
import com.bbx.api.sdk.net.base.JsonBuild;
import com.bbx.api.sdk.net.passeger.conn.ActivityNet;
import com.bbx.api.sdk.net.passeger.conn.AddThanksNet;
import com.bbx.api.sdk.net.passeger.conn.CancelReasonListNet;
import com.bbx.api.sdk.net.passeger.conn.CouponCountNet;
import com.bbx.taxi.client.Bean.Message.ObserverListener.DATA_TYPE;
import com.bbx.taxi.client.Task.BaseAsyncTask;
import com.bbx.api.util.SharedPreEncryptUtil;
import com.bbx.taxi.client.MyApplication;
import com.bbx.taxi.client.R;
/** 
 * @Path com.bbx.taxi.client.Task.AddThanksTask.java
 * @Author 严旭文
 * @Date 2016-7-28 下午2:41:49
 * @Company 蓝海（福建）信息技术有限公司
 * @Description
 * 添加感谢费
 */
public class MyAddThanksTask extends BaseTask{
    public DATA_TYPE TYPE=DATA_TYPE.ADDTHANKS;
    private AddThanksBuild mAddThanksBuild;
	public MyAddThanksTask(Activity context,String order_id,int schedule_fee,String line_id,int order_type) {
		super(context);
		mAddThanksBuild = new AddThanksBuild(context);
		mAddThanksBuild.uid=MyApplication.getInstance().getUid();
		mAddThanksBuild.access_token=MyApplication.getInstance().getToken();
		mAddThanksBuild.order_id =order_id;
		mAddThanksBuild.schedule_fee =schedule_fee;
		mAddThanksBuild.line_id =line_id;
		mAddThanksBuild.order_type =order_type;
	}
	@Override
	public boolean isShow() {
		return true;
	}

	@Override
	public boolean isReturnString() {
		return false;
	}
	@Override
	public boolean condition() {
		// TODO Auto-generated method stub
		return true;
	}
	@Override
	public void request() {
		setType(TYPE,mAddThanksBuild);
	}
	@Override
	public void success(int status,Object object) {
		ToastUtil.showToast(context, "添加成功");
		
	}
	@Override
	public void failed(int status, String msg,String message) {
		ToastUtil.showToast(context, "添加失败");
		
	}
	@Override
	public BaseNetwork getBaseNetwork() {
		return new AddThanksNet(context);
	}
}
